extends Node3D

var player_score: int = 0
@onready var label: Label = $Label

func increase_score() -> void:
	player_score += 1
	label.text = "Score: " + str(player_score)

func _on_mob_spawner_3d_mob_spawned(mob: Variant) -> void:
	mob.died.connect(increase_score)


func _on_kill_zone_area_entered(area: Area3D) -> void:
	get_tree().reload_current_scene.call_deferred() # 延迟执行reload_current_scene
